package uk.ac.ebi.bioinvindex.model.impl;

import uk.ac.ebi.bioinvindex.model.impl.term.DataTypeImpl;

import javax.persistence.*;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jul 18, 2007
 */
@Entity
@Table(name = "data")
public class DataImpl extends AnnotatableImpl {

	private String url;

	private DataTypeImpl type;

    protected DataImpl() {
    }


    public DataImpl(String url, DataTypeImpl type) {
		this.url = url;
		this.type = type;
	}

    public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

    @ManyToOne(targetEntity = uk.ac.ebi.bioinvindex.model.impl.term.DataTypeImpl.class,
			cascade = CascadeType.PERSIST)
	@JoinColumn(name = "type")
    public DataTypeImpl getType() {
		return type;
	}

	public void setType(DataTypeImpl type) {
		this.type = type;
	}
}
